package com.qding.park.common.core.annotation;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.CachePut;
import org.springframework.cache.annotation.Cacheable;

/**
 * @ClassName MethodCaching
 * @Description TODO(缓存注解组合)
 * @author Administrator
 * @Date 2016年9月6日 上午10:16:35
 * @version 1.0.0
 */
@Target({ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Inherited
@Documented
public @interface MethodCaching {
	
	/**
	 * @Description (主缓存)
	 * @return
	 */
	MethodCacheable cacheable();

	/**
	 * @Description (副缓存)
	 * @return
	 */
	MethodCacheCut[] put() default {};

	/**
	 * @Description (清除缓存)
	 * @return
	 */
	MethodCachEvict[] evict() default {};
}
